# 函数input() 带提示输出的输入

prompt = "\nTell me something, and I will repeat it back to you: "
prompt += "\nEnter 'quit' to end the program.\n"
message = ""

# while message != 'quit':
#     message = input(prompt)
#     if message != 'quit':
#         print(message)

# while 1:
#     message = input(prompt)
#     if message == 'quit':
#         break # 立即退出循环(for循环也适用)，continue是继续下一循环(从当前位置直接跳转到下一循环)
#     print(message)

# message = input(prompt)
# while message != 'quit':
#     print(message)
#     message = input(prompt)

# 使用标志(flag)判断
active = True
while active:
    message = input(prompt)

    if message == 'quit':
        active = False
    else:
        print(message)